﻿<!DOCTYPE html>
<html lang="en">
    <title>合同详情</title>
</head>
<link rel="stylesheet" href="/static/layui/css/layui.css" />
<body>
<form class="layui-form"  action="" lay-filter="edit">
    <div class="layui-form-item">
        <label class="layui-form-label">账号：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="auser" id="auser"  required  lay-verify="required" placeholder="请输入房屋名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名字：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="aname" id="aname"  required  lay-verify="required" placeholder="请输入租户名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">电话：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="aphone" id="aphone"  required  lay-verify="required" placeholder="请输入合同签署时间" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮箱：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="aemail" id="aemail"  required  lay-verify="required" placeholder="请输入合同生效时间" autocomplete="off" class="layui-input">
        </div>
    </div>
    <!--<div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">返回</button>
        </div>
    </div>-->
</form>
</body>
<script src="/static/js/system.js"></script>
<script src="/js/jquery-3.4.1.min.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
    $(function () {
        $("input").prop("disabled","disabled");
    })
    layui.use(['form','layer'], function(){
        var form = layui.form;
        $.ajax({
            url:'/CaretakerController/findAll',
            type:"post",
            dataType:"json",
            data:{"aid":getQueryString("aid")},
            success:function (da) {
                console.log(da)
                if (da.code == 200) {
                    // form.val("edit", da.date);
                    form.val("edit", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
                        "auser": da.date.auser // "name": "value"
                        ,"aname": da.date.aname
                        ,"aphone":da.date.aphone
                        ,"aemail": da.date.aemail
                    });
                } else {
                    parent.layer.msg("详情查询失败！");
                }
            }
        });
    });

</script>
</html>